package cn.smart.epic.common.constant.state;

/**
 * @Auther Z.B
 * @date 2017/9/21 16:45
 * @Email 2545375@qq.com
 * @Description 是否是菜单的枚举
 * @since 1.0
 */

public enum IsMenu {

    YES(1,"是"),
    NO(0,"不是"); //不是菜单的是按钮

    int code;
    String message;

    IsMenu(int code, String message) {
        this.code=code;
        this.message=message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static String valueOf(Integer status) {
        if (status == null) {
            return "";
        }else{
            for (IsMenu is : IsMenu.values()) {
                if (is.getCode()==status) {
                    return is.getMessage();
                }
            }
            return "";
        }
    }
}
